<div class="pageHeader">
	<form action="/queue/add" method="post" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone);">
		{% csrf_token %}
		<div class="pageFormContent nowrap">
			<dl>
				<dt>发送给:</dt> 
				<dd>
					<select name="receiver" class="required">
						<option value="{{status.uid}}">本人({{status.uid}})</option>
						{% for contact in contact_list %}
						<option value="{{ contact.uid }}">{{ contact.uid }}</option>
						{% endfor %}
					</select>
				</dd>
			</dl>
			<dl>
				<dt>消息:</dt>
				<dd>
					<textarea name="msg" class="required"></textarea>
				</dd>
			</dl>
			<dl>
				<dd><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></dd>
			</dl>
		</div>
	</form>
</div>
<div class="pageHeader">
	状态{{status.phone}}：<span {%if status.status == 'OFF'%}style="color:red"{%endif%}>{{status.status}}</span> |
	上次登陆：{{status.login_ip}}
</div>
<div class="pageContent">
	<div layoutH="80">
		<table class="list" width="100%">
			<thead>
				<tr>
					<td width="100">发送人</td>
					<td width="100">发送给</td>
					<td>消息</td>
					<td width="100">操作</td>
				</tr>
			</thead>
			<tbody>
				{% for q in list %}
				<tr>
					<td>{{q.phone|slice:"8"}}***</td>
					<td>{{q.receiver}}</td>
					<td>{{q.msg}}</td>
					<td><a href="/queue/del/{{q.id}}" target="ajaxTodo" title="确定要删除吗?">删除</a></td>
				</tr>
				{% endfor %}
			</tbody>
		</table>
	</div>
</div>
